package com.example.index.web.feign;

import com.example.index.web.User;
import org.springframework.stereotype.Component;

// 降级类
@Component
public class UserActionHystrix implements IUserAction{
    @Override
    public String user() {
        return "降级 user";
    }

    @Override
    public String hello(String name) {
        return "你好 " + name;
    }

    @Override
    public int add(int a, int b) {
        return a - b;
    }

    @Override
    public User reg(User user) {
        user.setName("降级 " + user.getName());
        return null;
    }

    @Override
    public String ptest(String ptest) {
        return ptest + " 降级";
    }
}
